-
Notifications
You must be signed in to change notification settings - Fork 184
fix-1392-Inconsistency-in-User-Verification-Status #2112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix-1392-Inconsistency-in-User-Verification-Status #2112
Conversation
👍 Expected behavior When the user hits Verify Phone, the alert should confirm that the user is verified. When the user hits Unverify Phone, the alert should confirm that the user is unverified. 👎 Actual Behavior When attempting to verify the phone number, an alert incorrectly states that the user is unverified. However, when attempting to unverify the phone, the system incorrectly indicates that the user is verified. Followed stnguyen90's guidelines: We want to update the alerts to be specific to say: XYZ's email has been verified XYZ's email has been unverified XYZ's phone has been verified XYZ's phone has been unverified Note: The "s" should only be there if the name does not end with s. For example, if the user's name was "Charles", it should be "Charles' email has been verified" Changed these lines: message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${ !$user.emailVerification ? 'unverified' : 'verified' }`, message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${ $user.phoneVerification ? 'unverified' : 'verified' }`, To these lines: message: `${$user.name || $user.email || $user.phone || 'The account'}${( $user.name || $user.email || $user.phone || 'The account' ).endsWith('s') ? "'" : "'s"} email has been ${!$user.emailVerification ? 'unverified' : 'verified'}`, message: `${$user.name || $user.email || $user.phone || 'The account'}${( $user.name || $user.email || $user.phone || 'The account' ).endsWith('s') ? "'" : "'s"} phone has been ${!$user.phoneVerification ? 'unverified' : 'verified'}`, Current behavior: XYZ's email has been verified XYZ's email has been unverified XYZ's phone has been verified XYZ's phone has been unverified OR (If the user's name ends in a s) QRS' email has been verified QRS' email has been unverified QRS' phone has been verified QRS' phone has been unverified
@stnguyen90 @ItzNotABug PR review request. A PR was submitted and reviewed by another contributor after mine was submitted. I don't know if you still want to review this one. |
That was me that submitted the PR. Sorry I didn't see your PR under the issue so I thought you forgot/left the issue. I did the PR similar to yours and they said I had to make some changes and after I made the changes they said someone else was working on it. @MicahHeneveld you should check out my PR just to be clear on what they wanted in case yours is next. I added another Issues fix in the same PR too. You can ignore that! Note I didn't saw that an Issue has to be assigned before you proceed with fix in the contribution guideline that's why I made the fix. |
ConsoleProject ID: Sites (2)
Note You can use Avatars API to generate QR code for any text or URLs. |
Hi, I'm working alongisde @MicahHeneveld! We improved the PR to fit the updated standards: We want to update the alerts to be specific to say: if name exists and isn't empty: The email for XYZ has been verified if name does not exist or is empty: The email has been verified Here's what we changed:
To this:
The code snippet is the same for the email and phone verification with some modifications to the variable names. This change allows the system to read if a name is provided and acts accordingly. |
What does this PR do?
Fixes this bug:
👍 Expected behavior
When the user hits Verify Phone, the alert should confirm that the user is verified. When the user hits Unverify Phone, the alert should confirm that the user is unverified. 👎 Actual Behavior
When attempting to verify the phone number, an alert incorrectly states that the user is unverified. However, when attempting to unverify the phone, the system incorrectly indicates that the user is verified.
Followed stnguyen90's guidelines:
We want to update the alerts to be specific to say:
XYZ's email has been verified
XYZ's email has been unverified
XYZ's phone has been verified
XYZ's phone has been unverified
Note:
The "s" should only be there if the name does not end with s. For example, if the user's name was "Charles", it should be "Charles' email has been verified"
Changed these lines:
message:
${$user.name || $user.email || $user.phone || 'The account'} has been ${ !$user.emailVerification ? 'unverified' : 'verified' }
,message:
${$user.name || $user.email || $user.phone || 'The account'} has been ${ $user.phoneVerification ? 'unverified' : 'verified' }
,To these lines:
message:
${$user.name || $user.email || $user.phone || 'The account'}${( $user.name || $user.email || $user.phone || 'The account' ).endsWith('s') ? "'" : "'s"} email has been ${!$user.emailVerification ? 'unverified' : 'verified'}
,Current behavior:
XYZ's email has been verified
XYZ's email has been unverified
XYZ's phone has been verified
XYZ's phone has been unverified
OR (If the user's name ends in a s)
QRS' email has been verified
QRS' email has been unverified
QRS' phone has been verified
QRS' phone has been unverified
Test Plan
Under a project, select Auth. In Auth, select or create a user that has both an email and a phone number. Select the 'Verify account' option and then verify the phone number and email. The correct alerts will be displayed.
Have you read the Contributing Guidelines on issues?
Yes